import { CONFIG_PATH, WORK_PATH, load as loadConfig, unload as unloadConfig } from './config';

const Path = require('path')

const TAG = "app";

/**
 * 加载
 */
export async function load() {
	await loadConfig();
	await lcc.workerMgr.startWorker(lcc.makeWorkerMeta('Config'))
	await lcc.workerMgr.startWorker(lcc.makeWorkerMeta('Pack'))
	await lcc.workerMgr.startWorker(lcc.makeWorkerMeta('WebsocketLine'))
	await lcc.workerMgr.startWorker(lcc.makeWorkerMeta('HttpLine'))
}

/**
 * 卸载
 */
export async function unload() {
    await lcc.workerMgr.release();
	await unloadConfig();
}
